package com.app.Activity;

import java.util.ArrayList;

import com.app.Controller.ReadWriteFileController;
import com.app.DTO.RoleDTO;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import app.com.ModuleRole.R;

public class frmVaiTroCuaToiActivity extends Activity {
	ListView lvDanhSachVaiTro;
	ArrayList<RoleDTO> listRole = null;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);		
		setContentView(R.layout.layout_vai_tro_cua_toi);
		lvDanhSachVaiTro = (ListView) findViewById(R.id.lvDanhSachVaiTro);
		fillListView();		
	}
	void fillListView() {

		listRole = ReadWriteFileController.readRole(ReadWriteFileController.MY_ROLE_PATH);
		ArrayAdapter<RoleDTO> adapter = new ArrayAdapter<RoleDTO>(this, android.R.layout.simple_list_item_1, listRole);
		lvDanhSachVaiTro.setAdapter(adapter);

	}
}
